package com.bamboo.model.domain;

import cn.hutool.json.JSONObject;
import com.bamboo.model.enums.COSBucketEnum;
import com.bamboo.model.enums.CloudVendorEnum;
import com.bamboo.model.enums.FileTypeEnum;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

/**
* @description
* @date 2025/3/27 下午2:39
* @author chenzh
*/
@TableName(value = "storage_result", keepGlobalPrefix = true, autoResultMap = true)
public class StorageResultEntity {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String requestId;
    private CloudVendorEnum cloudVendor;
    private String objKey;
    @TableField(value = "bucket_code")
    private COSBucketEnum bucket;
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject extraInfo;
    private String url;
    private String filename;
    private String fileMd5;
    private FileTypeEnum fileType;
    private Long fileSize;
    private String suffix;
    private Integer deleted;
    private Integer deletedTime;
    private String localFilename;
    private Integer localDeleted;
    private Integer localDeletedTime;
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public CloudVendorEnum getCloudVendorEnum() {
        return cloudVendor;
    }

    public void setCloudVendorEnum(CloudVendorEnum cloudVendorEnum) {
        this.cloudVendor = cloudVendorEnum;
    }

    public String getObjKey() {
        return objKey;
    }

    public void setObjKey(String objKey) {
        this.objKey = objKey;
    }

    public COSBucketEnum getBucket() {
        return bucket;
    }

    public void setBucket(COSBucketEnum bucket) {
        this.bucket = bucket;
    }

    public JSONObject getExtraInfo() {
        return extraInfo;
    }

    public void setExtraInfo(JSONObject extraInfo) {
        this.extraInfo = extraInfo;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public String getFileMd5() {
        return fileMd5;
    }

    public void setFileMd5(String fileMd5) {
        this.fileMd5 = fileMd5;
    }

    public FileTypeEnum getFileType() {
        return fileType;
    }

    public void setFileType(FileTypeEnum fileType) {
        this.fileType = fileType;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getDeletedTime() {
        return deletedTime;
    }

    public void setDeletedTime(Integer deletedTime) {
        this.deletedTime = deletedTime;
    }

    public String getLocalFilename() {
        return localFilename;
    }

    public void setLocalFilename(String localFilename) {
        this.localFilename = localFilename;
    }

    public Integer getLocalDeleted() {
        return localDeleted;
    }

    public void setLocalDeleted(Integer localDeleted) {
        this.localDeleted = localDeleted;
    }

    public Integer getLocalDeletedTime() {
        return localDeletedTime;
    }

    public void setLocalDeletedTime(Integer localDeletedTime) {
        this.localDeletedTime = localDeletedTime;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "StorageResultEntity{" +
                "id=" + id +
                ", requestId='" + requestId + '\'' +
                ", cloudVendor=" + cloudVendor +
                ", objKey='" + objKey + '\'' +
                ", bucket=" + bucket +
                ", extraInfo=" + extraInfo +
                ", url='" + url + '\'' +
                ", filename='" + filename + '\'' +
                ", fileMd5='" + fileMd5 + '\'' +
                ", fileType=" + fileType +
                ", fileSize=" + fileSize +
                ", suffix='" + suffix + '\'' +
                ", deleted=" + deleted +
                ", deletedTime=" + deletedTime +
                ", localFilename='" + localFilename + '\'' +
                ", localDeleted=" + localDeleted +
                ", localDeletedTime=" + localDeletedTime +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
